<template>
  <div class="container">
    <el-button type="primary" @click="open">执行顺序</el-button>
  </div>
</template>

<script lang="ts">
import { accuracy } from "../utils/number";

export default {
  data() {
    return {};
  },
  mounted() {
    const total = accuracy(0.1, 0.2);
    console.log(total, "小数点精度：0.1 + 0.2");
  },
  methods: {
    /**
		 open() {
			console.log('我是1')
			this.$nextTick(() => {
				console.log('我是2')
			})
			console.log('我是3')
		}
		*/
    /** nextTick 不包裹写法 */
    async open() {
      console.log("我是1");
      this.$nextTick(() => {
        console.log("我是2");
      });
      await 1;
      console.log("我是3");
    },
  },
};
</script>

<style lang="scss" scoped></style>
